<?php
declare (strict_types = 1);

namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;
class GmEmailjobls extends Model
{
    use SoftDelete;
     protected $deleteTime = "delete_time";
    // 获取列表
    public static function getList()
    {
        $where = [];
        $limit = input('get.limit');
        
               //按列表名称查找
               if ($lsname = input("lsname")) {
                   $where[] = ["lsname", "like", "%" . $lsname . "%"];
               }
               //按列表内容查找
               if ($lscontent = input("lscontent")) {
                   $where[] = ["lscontent", "like", "%" . $lscontent . "%"];
               }
               //按列表类型(1.玩家列表 2.物品列表)查找
               if ($lstype = input("lstype")) {
                   $where[] = ["lstype", "like", "%" . $lstype . "%"];
               }
               //按备注查找
               if ($lsremake = input("lsremake")) {
                   $where[] = ["lsremake", "like", "%" . $lsremake . "%"];
               }
        $list = self::order('id','desc')->where($where)->paginate($limit);
        return ['code'=>0,'data'=>$list->items(),'extend'=>['count' => $list->total(), 'limit' => $limit]];
    }
}
